home *** CD-ROM | disk | FTP | other *** search
- rem
- rem DX.SYN Synonyms for DX v2.60 Robert K. Blaine/ECONO-SOFT 8/90.
- rem
- rem This file is intended as a working sample of a set of synonyms
- rem to make using DX easier. You may use them as is or take them as
- rem examples in developing or augmenting your own. They will work with
- rem a new Command Line Enhancer due out from ECONO-SOFT by the end of
- rem 1990 and with the Cove Software Group's PCED product. With minor
- rem changes, they should run with any Command Line Enhancer that does
- rem synonym processing.
- rem
- rem This synonym file will run without modification assuming that DX.EXE
- rem is located in a directory on your PATH. To make the synonyms run faster,
- rem it is advantageous to replace all occurances of "dx" in this file with
- rem a call that specifies the entire path -- the best performance will be
- rem achieved by copying DX to a RAM disk as part of your AUTOEXEC.BAT and
- rem then replacing all occurances of "dx" in this file with "x:dx" where
- rem "x:" is the name of the RAM disk.
- rem
- rem This synonym file may be loaded into PCED with the following command:
- rem ced -b1024,128,3000,128,128,128 load dx.syn
- rem
- rem Try to avoid the use of positional parameters (%1, %2, etc.) as they
- rem make the use of multiple patterns difficult (pattern1+pattern2;pattern3).
- rem If you don't use any positional parameters, PCED will tack all the
- rem parameters on to the end of the synonym. If you must use positional
- rem parameters, using all 9 (as shown in the "comp" example) allows the most
- rem flexibility in adding additional parameters.
-
- rem ================ Clear Previous Synonyms ==================================
-
- clear syn
-
- rem ================ Quick and Easy Directories ===============================
-
- syn d "dx"
- syn da "dx a:"
- syn db "dx b:"
- syn dc "dx c:"
- syn dd "dx d:"
-
- rem Ex: d ;view default directory
- rem db ;view directory of B:
-
- rem ================ Quick and Easy Wide-Format Directories ===================
-
- syn dw "dx /w"
- syn daw "dx /w a:"
- syn dbw "dx /w b:"
- syn dcw "dx /w c:"
- syn ddw "dx /w d:"
- syn dcf "dx %1\"
- syn dcfw "dx %1\/w"
-
- rem Ex: dw ;view default directory in wide format
- rem dd ;view directory of D: in wide format
- rem dcf myzip ;view directory of MYZIP.ZIP
- rem dcfw myarc ;wide directory of MYARC.ARC
-
- rem ================ Selecting Files ==========================================
-
- syn ld "dx /ld"
- syn ldw "dx /ld/w"
- syn new "dx /at:!a"
- syn sd "dx /at:!d"
- syn tod*ay "dx /since"
- syn yes*ter "dx /since:yesterday"
-
- rem Ex: ld ;show sizes of all files in each directory in
- rem ;the tree from the current directory on down
- rem ldw ;wide-format of the directory tree
- rem new ;view all files newly created or modified
- rem sd ;show all directories in current directory
- rem tod ;view all files created or modified today
-
- rem ================ Deleting Files ===========================================
-
- syn cleanup "dx /ff/del/p-/v- \%1.bak+.tmp+.hld+*temp*"
- syn dbak "dx %1*.bak /del /v- %2 %3 %4 %5 %6 %7 %8 %9"
- syn delsys "if not '%1' == '' dx %1\ibm*.com+command.com/ro:i/del/f"
- syn dro "dx /del/v/ro:i"
- syn gobak "dx /gobak /v-"
- syn vdel "dx /del/v/ro:n"
- syn vdelzip "dx %1\ /run:'pkzip -d $p $n'"
- syn zdel "dx /size:0 /del /v-"
-
- rem Ex: cleanup ;sweep the default drive and delete all ".BAK",
- rem ;".TMP",".HLD", and "*TEMP*" files without asking
- rem dbak c: ;delete all "C:*.BAK" files without verify
- rem delsys a: ;remove DOS system files from A:
- rem dro ;verified delete of all files ignoring the
- rem ;read-only attribute
- rem gobak prog.pas ;if "PROG.BAK" exists, delete "PROG.PAS"
- rem ;and rename "PROG.BAK" to "PROG.PAS"
- rem vdel \path ;verified delete of normal files in "\path";
- rem ;read-only files never touched
- rem vdelzip myzip ;verified delete of files in MYZIP.ZIP
- rem zdel ;delete all zero-length files in this directory
- rem zdel \ /ff ;sweep the entire disk deleting zero-length files
-
- rem ================ Copying, moving, and comparing files and trees ===========
-
- syn comp "dx /v-/p- %1 /comp:%2 %3 %4 %5 %6 %7 %8 %9"
- syn co*pyc "dx /v-/p- %1 /copy:%2 %3 %4 %5 %6 %7 %8 %9"
- syn coptree "dx %1 /ff /copy:%2\$p\"
- syn mo*ve "dx /v-/p- %1 /move:%2 %3 %4 %5 %6 %7 %8 %9"
- syn movtree "dx %1 /ff /move:%2\$p\"
- syn vco*pyc "dx /v /p- %1 /copy:%2 %3 %4 %5 %6 %7 %8 %9"
- syn vmo*ve "dx /v /p- %1 /move:%2 %3 %4 %5 %6 %7 %8 %9"
-
- rem Ex: comp *.pas c: ;compare all "*.pas" to files on C:
- rem coptree a:\ c:\xx ;copy the entire disk to c: under C:\XX
- rem copy *t e:\save\ ;copy all files ending in "t" to "E:\SAVE"
- rem ;creating the directory if needed
- rem movtree \here \there ;move an entire tree from \HERE to \THERE
- rem vmov .hld \hold ;verified move of all "*.HLD" to "\HOLD"
-
- rem ================ File Attribute and Date Manipulation =====================
-
- syn fa "dx /v- %1 /fa:%2 %3 %4 %5 %6 %7 %8 %9"
- syn fd "dx /v- %1 /fd:%2 %3 %4 %5 %6 %7 %8 %9"
- syn ro "dx /fa:r /v-"
- syn ro-all "dx /at:r- /ff /fa:r /v- /p- \%1.com+.exe+.bat+.dev+.sys"
- syn rw "dx /fa:r-/v-"
- syn touch "dx /fdate:now"
-
- rem Ex: fa newfile a- ;turn off the archive bit on "newfile"
- rem fd xx 3-sep:6p ;set xx's date/time to September 3 at 6:00pm
- rem ro file.ext ;make "file.ext" read-only
- rem ro-all b: ;sweep the B: drive making all appropriate
- rem ;files read-only
- rem rw .bas ;make all "*.bas" read-write
- rem touch .pas ;set the date/time on all "*.PAS" files in this
- rem ;directory to the current date/time
-
- rem ========================== Utility Options ================================
-
- rem Call Chris Dunford's file differencer, HDIFF, to compare a file with it's
- rem backup version:
- syn diffbak "dx /run:'hdiff -cs $d$p\$f.bak $s'"
-
- rem Ex: diffbak prog.pas ;compare prog.bak with prog.pas
-
- rem To print a complete disk directory in "tiny" print on an Epson printer:
- syn fulldir "dx \%1 /f /ff:a /so:*nec /he:2 /st:4 /pr /prm:tiny /prmarg:10"
-
- rem Display free space on a disk, type "free x:"
- syn free "dx /st:4 /to"
-
- rem To simply create a list of files, type "lf files"
- syn lf*iles "echo $n | dx /b /ex- /o"
-
- rem Test if a set of files exist in another drive/directory and delete them
- rem from this directory if so:
-
- syn tdel "echo if exist %2$n dx $n/del | dx/b %1"
-
- rem Ex: tdel .pas b: ;delete *.pas if present on B: -- verified
-
- rem Verified interface to PRINT.COM (PRINT.COM must have been previously
- rem loaded or the system will hang). (Under DOS 3.x or above, change '$d$n'
- rem below to '$s' to allow you to print from any directory.)
-
- syn vprint "dx /run:'print $d$n'"
-
- rem Ex: vprint *.doc ;verified print of "*.DOC"
-
- syn ff "dx /ff \"
- syn ffa "dx /ff:a \"
- syn fs "dx %1/fs:%2 %3 %4 %5 %6 %7 %8 %9"
- syn view "dx /view /v-"